Interaction Binomial Power/Sample Size

Program Code

The program is written in JavaScript.

Source

The program uses the approximate variance of the logarithm of the ratio of odds ratio. Fleiss, J.L. Statistical Rates and Proportions (1981), page 165 provides the variance estimate for an estimated odds ratio. The total sample size is calculated as follows

N = (q(1-a/2)+q(1-b))2 * S [1/fij*(pij*(1-pij))]/D2

Where fij are the cell frequencies and pij are the event probabilities in treatment i and stratum j, q is the inverse normal function, and

D=log(o1/o2)

Where

oj = p1j(1-p2j)/(p2j(1-p1j)) is the odds ratio for the treatment effect within stratum j

Input Items

The user is prompted for values to the following items. For items that have initial default values set, the values are given in parentheses.